/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package firstround09;

import java.util.Arrays;
import java.io.IOException;
import static chanlib.Chan_IO.*;

/**
 * @author robit
 */
public class CollectingCards{
    /*
      All neccesary to be defined
      including:
      variable, inner class
    */
    // static int A;
    // static void B();
    // static class nC
    public static long[][] nC;
    public static void nCr(int bound){
        nC=new long[bound+1][bound+1];
        nC[0][0]=1;
        for(int n=1;n<=bound;n++){
            nC[n][0]=1;
            for(int k=1;k<=n;k++){
                nC[n][k]=nC[n-1][k-1]+nC[n-1][k];
            }
        }
    }
    /*
       One calculation fits all of the cases.
    */
    static void preReckon(){
        nCr(40);
        return;
    }
    // Tx=y
    static void backSubstitution(double A[][],double x[],double y[]){
        int dim=x.length;
        for(int r=dim-1;r>=0;r--){
            double sum=y[r];
            for(int c=r+1;c<dim;c++){
                sum-=A[r][c]*x[c];
            }
            x[r]=sum/(A[r][r]);
        }
    }
    /*
      calculate the answer
    */
    private static void reckon(int line) {
        int C=Int();
        int N=Int();
        double T[][]=new double[C+1][C+1];
        double E[]=new double[C+1];
        double ones[]=new double[C+1];

        Arrays.fill(ones,1);
        ones[C]=0;

        for(int x=0;x<C;x++){
            T[x][x]=1;
            for(int y=x;y<=C;y++){
                if(y<=x+N)
                T[x][y]-=(double)nC[C-x][y-x]*nC[x][N-y+x]/nC[C][N];
            }
        }
        T[C][C]=1;
        backSubstitution(T, E, ones);

        double ans = E[0];
        String output=String.format("Case #%d: %f",line,ans);
        writeln(output,OUTFILE);
        //writeln(String.format("N=%d K=%d\n%s", N, K, ans),ANALFILE);
        //println(output);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        /*
           Pre-computing for all cases
        */

        // Just in case!
        preReckon();
        //while((char)read()!='P');

        /*
          Input-output
        */
        boolean test=false;
        boolean small=false;
        String prob="C";
        String filename;
        if(test) filename="test";
        else{
            if(small) filename=prob+"-small-practice";
            else filename=prob+"-large-practice";
        }
        try {
            /*
               Init IO,plus determination of input line number
             */
            int lineNums = initFileIO(filename);
            for (int i = 1; i <= lineNums; i++) {
                reckon(i);
            }
        } finally {
            endIO();
        }
    }

}
